home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / C64 / U-Utilities / (c)u2.d64 / fast bam.c (.txt) < prev    next >
Commodore BASIC  |  2007-02-04  |  2KB  |  71 lines

  1. 2 REM: C64 FAST BAM UTILITY
  2. 3 REM: CONFIGURATION: C64+1540/1 DISK
  3. 4 :
  4. 5 REM: USES M/C ROUTINE @ $C000
  5. 6 REM: STORES BIT MAP @ $C100
  6. 7 :
  7. 8 REM: M/C ROUTINE SELF LOADS
  8. 9 :
  9. 10 REM: PAUL BLAIR/PETER FLETCHER
  10. 11 REM: CANBERRA AUSTRALIA 5 FEB 84
  11. 12 :
  12. 15 IFPEEK(49152)=160THEN21
  13. 20 F=F+1:LOAD"BAMGET.D",8,1
  14. 21 M=53280:POKEM,15:POKEM+1,15
  15. 30 PRINT"[147][144][146]       COMMODORE 64 DISK UTILITY"
  16. 35 PRINT"       BLOCK ALLOCATION MAP (BAM)"
  17. 36 PRINT"       PAUL BLAIR/PETER FLETCHER"
  18. 37 PRINT"       CANBERRA AUSTRALIA FEB 84"
  19. 38 PRINT"[144]       PLEASE INSERT DISK IN DRIVE"
  20. 40 PRINT"        PRESS ANY KEY WHEN READY"
  21. 50 GETY$:IFY$=""THEN50
  22. 60 Y$="":X$=""
  23. 70 OPEN15,8,15:PRINT#15,"I0"
  24. 80 OPEN2,8,2,"#"
  25. 90 PRINT#15,"U1";2;0;18;0
  26. 100 PRINT#15,"B-P:"2;4
  27. 110 SYS49152 :REM CLEAR BUFFER
  28. 120 SYS49178 : REM READ BAM
  29. 130 CLOSE2:CLOSE15
  30. 140 POKEM,11:PRINT"[147][149]   TRACKS[146]   11111111112222222222333333"
  31. 150 PRINT"   12345678901234567890123456789012345"
  32. 160 PRINT"[175][144]  [175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175]"
  33. 170 PRINT"S[146]0[144][167]                                   [165]"
  34. 180 PRINT"E[146]1[144][167]                                   [165]"
  35. 190 PRINT"C[146]2[144][167]                                   [165]"
  36. 200 PRINT"T[146]3[144][167]                                   [165]"
  37. 210 PRINT"O[146]4[144][167]                                   [165]"
  38. 220 PRINT"R[146]5[144][167]                                   [165]"
  39. 230 PRINT"S[146]6[144][167]                                   [165]"
  40. 240 PRINT" 7[144][167]                                   [165]"
  41. 250 PRINT" 8[144][167]                                   [165]"
  42. 260 PRINT" 9[144][167]                                   [165]"
  43. 270 PRINT"10[144][167]                                   [165]"
  44. 280 PRINT"11[144][167]                                   [165]"
  45. 290 PRINT"12[144][167]                                   [165]"
  46. 300 PRINT"13[144][167]                                   [165]"
  47. 310 PRINT"14[144][167]                                   [165]"
  48. 320 PRINT"15[144][167]                                   [165]"
  49. 330 PRINT"16[144][167]                                   [165]"
  50. 340 PRINT"17[144][167]                              [207][183][183][183][183]"
  51. 350 PRINT"18[144][167]                        [207][183][183][183][183][183]"
  52. 360 PRINT"19[144][167]                 [207][183][183][183][183][183][183]     [209][144]=USED"
  53. 370 PRINT"20[144][167]                 [165]"
  54. 380 PRINT"   [183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183]"
  55. 390 B=49408:FORT=1TO35
  56. 400 IFT<18THENA=20:GOTO440
  57. 410 IFT<25THENA=18:GOTO440
  58. 420 IFT<31THENA=17:GOTO440
  59. 430 A=16
  60. 440 FORS=0TOA:IFPEEK(B)=1ANDT<>18THENBF=BF+1
  61. 441 IFPEEK(B)=1THENB=B+1:GOTO460
  62. 450 PRINT""LEFT$(Y$,S+3)LEFT$(X$,T+2)""MID$("[209][160]",PEEK(B)+1,1);:B=B+1
  63. 460 NEXT:NEXT
  64. 470 PRINT""LEFT$(Y$,23)LEFT$(X$,21)"[144]BLOCKS FREE ="BF
  65. 480 PRINT""LEFT$(Y$,24)"[151]      'C' TO CONTINUE 'E' TO END       ";
  66. 481 POKE2023,160:POKE56295,11
  67. 490 GETR$:IFR$=""THEN490
  68. 500 IFR$="E"THENPRINT"":END
  69. 510 IFR$="C"THENRUN
  70. 520 GOTO490
  71.